#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int fb(int a,int b) 
{
	
	if (b == 0) return 1;
	else if (b == 1) return a;
	else return a * fb(a, b - 1);
}

int main() 
{
	int a, b;
	scanf("%d%d",&a,&b);
	printf("%d",fb(a, b));

}